﻿
#ifndef CDispatch_H
#define CDispatch_H
#include <thread>
#include <mutex>
#include <vector>
#include <atomic>
#include <array>
#include <queue>
#include <iostream>
#include <fstream>
using namespace std;
#include <stdint.h>
#include <stdio.h>


//任务派发线程
class CDispatch
{
public:
    CDispatch(void);
    virtual ~CDispatch(void);
public:
    bool getstatus(void);
    bool start(void);
    bool stop(void);
private:
    virtual int init(void) =0;
    virtual int free(void) =0;
    //接受数据线程HandleCanMsg
    virtual int runHelp(void)=0;
private:
    void run(void);
private:
    std::thread m_th;
    std::atomic_bool m_status;
};





#endif